package com.cloudpolice.door.feignInterface;

import com.cloudpolice.door.feignInterface.hystric.DoorAuthorityInterFaceHystric;
import lh.model.ResultVO;
import lh.model.ResultVOPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Repository
@FeignClient(value = "user-mucon/doorAuthorityController", fallback = DoorAuthorityInterFaceHystric.class)
public interface DoorAuthorityInterFace {
    @PostMapping("/getDoorPictureAuthorityTest")
    ResultVOPage getDoorPictureAuthorityTest(
            @RequestParam(value = "page", defaultValue = "1") int page,
            @RequestParam(value = "limit", defaultValue = "10") int limit);

    @PostMapping("/getDoorCardAuthorityTest")
    ResultVOPage getDoorCardAuthorityTest(
            @RequestParam(value = "page", defaultValue = "1") int page,
            @RequestParam(value = "limit", defaultValue = "10") int limit);

    @PostMapping("/getDoorCardAuthority")
    ResultVOPage getDoorCardAuthority(
            @RequestParam(value = "communityId") String communityId
            , @RequestParam(value = "periodId", required = false) String periodId
            , @RequestParam(value = "buildId", required = false) String buildId
            , @RequestParam(value = "unitId", required = false) String unitId
            , @RequestParam(value = "page", defaultValue = "1") int page
            , @RequestParam(value = "limit", defaultValue = "10") int limit
    );
    @PostMapping("/getDoorPictureAuthority")
    ResultVOPage getDoorPictureAuthority(
            @RequestParam(value = "communityId") String communityId
            , @RequestParam(value = "periodId", required = false) String periodId
            , @RequestParam(value = "buildId", required = false) String buildId
            , @RequestParam(value = "unitId", required = false) String unitId
            , @RequestParam(value = "page", defaultValue = "1") int page
            , @RequestParam(value = "limit", defaultValue = "10") int limit);


    }
